<style>
    #edit-form strong{
        color: red;
    }
    .el-dialog--center .el-dialog__body {
        text-align: initial;
        padding: 25px 25px 30px;
    }

    .el-dialog__body {
        padding: 20px;
        color: #48526a;
        font-size: 14px;
    }
    .el-dialog__body {
        padding: 30px 20px;
        color: #606266;
        line-height: 24px;
        font-size: 14px;
    }
    .in-content {
        width: 750px;
    }
    .in-content .products-list .k1, .in-content .products-list .k2 {
        width: 170px;
    }
    .in-content .products-list .list-content .pd-item {
        height: 38px;
        line-height: 25px;

    }
    .in-content .products-list .k-text {
        display: inline-block;
        vertical-align: top;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .el-input-number  {
        -webkit-appearance: none;
        padding-left: 50px;
        padding-right: 50px;
        text-align: center;
    }
    select.form-control {
        width: 170px;
        height: 34px;
        padding: 9px 12px;
    }
    .row-flex{
      flex-direction: row !important;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><strong >*</strong>{:__('Itemname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-itemname" data-rule="required" class="form-control form-control" name="row[itemname]" type="text" value="{$row.itemname}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><strong >*</strong>{:__('Sku')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sku" data-rule="required" class="form-control form-control" name="row[sku]" type="text" value="{$row.sku}">
        </div>
    </div>
    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2"><strong >*</strong>{:__('barcode')}:</label>
      <div class="col-xs-12 col-sm-8">
          <input id="c-barcode" data-rule="required" class="form-control form-control" name="row[barcode]" type="text" value="{$row.barcode}">
      </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><strong >*</strong>{:__('Source')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-source" data-rule="required" class="form-control form-control" name="row[source]" type="text" value="{$row.source}">
        </div>
    </div>






    <div class="form-group">
      <label class="control-label col-xs-12 col-sm-2">{:__('ProductUnit')}:</label>
      <div class="col-xs-12 col-sm-8">
          <select class="form-control selectpicker combobox" id ="ProductUnit" name="row[ProductUnit]">
              {foreach $productUnits as $key=>$item}
              <option value="{$item.id}">{$item.name}</option>
              {/foreach}
          </select>
      </div>
  </div>
  


  <div class="row-flex">
      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label"><strong >*</strong>{:__('Beforelong')}:</label>
          </div>
          <div class="col-xs-7 col-sm-7">
            <input id="c-beforelong" data-rule="required" class="form-control form-control" placeholder='长(CM)' name="row[beforelong]" type="number" value="{$row.beforelong}">
          </div> 
      </div>

      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label "><strong >*</strong>{:__('Beforewidth')}:</label>
            </div>
            <div class="col-xs-7 col-sm-7">
              <input id="c-beforewidth" data-rule="required" class="form-control form-control" placeholder='宽(CM)' name="row[beforewidth]" type="number" value="{$row.beforewidth}">
          </div>
      </div>
  </div>

  <div class="row-flex">
      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label"><strong >*</strong>{:__('Beforehigh')}:</label>
          </div>
          <div class="col-xs-7 col-sm-7">
              <input id="c-beforehigh" data-rule="required" class="form-control form-control" placeholder='高(CM)' name="row[beforehigh]" type="number" value="{$row.beforehigh}">
          </div> 
      </div>

      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label"><strong >*</strong>{:__('Beforeweight')}:</label>
            </div>
            <div class="col-xs-7 col-sm-7">
                <input id="c-beforeweight"  data-rule="required" class="form-control form-control" placeholder='重量(KG)' name="row[beforeweight]" type="number" value="{$row.beforeweight}">
            </div>
      </div>
  </div>

  <div class="row-flex">
      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label">{:__('Afterlong')}:</label>
          </div>
          <div class="col-xs-7 col-sm-7">
              <input id="c-afterlong"  class="form-control form-control" placeholder='长(CM)' name="row[afterlong]" type="number" value="{$row.afterlong}">
          </div> 
      </div>

      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label">{:__('Afterwidth')}:</label>
            </div>
            <div class="col-xs-7 col-sm-7">
                <input id="c-afterwidth"  class="form-control form-control" placeholder='宽(CM)' name="row[afterwidth]" type="number" value="{$row.afterwidth}">
            </div>
      </div>
  </div>


  <div class="row-flex">
      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label">{:__('Afterhigh')}:</label>
          </div>
          <div class="col-xs-7 col-sm-7">
              <input id="c-afterhigh"  class="form-control form-control" placeholder='高(CM)' name="row[afterhigh]" type="number" value="{$row.afterhigh}">
          </div> 
      </div>

      <div class="form-group col-xs-6 col-sm-6 row-flex">
          <div class="col-xs-5 col-sm-5">
              <label class="control-label">{:__('Afterweight')}:</label>
            </div>
            <div class="col-xs-7 col-sm-7">
                <input id="c-afterweight"  class="form-control form-control" placeholder='重量(KG)' name="row[afterweight]" type="number" value="{$row.afterweight}">
            </div>
      </div>
  </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Describe')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-describe"  class="form-control form-control" name="row[describe]" type="text" value="{$row.describe}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Customscode')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-customscode"  class="form-control form-control" name="row[customscode]" type="text" value="{$row.customscode}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Declareprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-declareprice"  class="form-control form-control" name="row[declareprice]" type="number" value="{$row.declareprice}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Origincountry')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-origincountry"  class="form-control form-control" name="row[origincountry]" type="text" value="{$row.origincountry}">
        </div>
    </div>
    <p class="block-title"><h3>关联平台SKU</h3>
        <button type="button" class="el-button el-button--default add-sku" style="float: right;">
        <span>添加关联SKU</span></button>
    </p>
    <div class="el-dialog__body">
        {empty name="skus"}
            <div class="in-content">
                <div class="products-list">
                    <div class="head-box">
                        <span class="k-text k2"><b>SKU</b></span>
                        <span class="k-text k2"><b>商品名</b></span>
                        <span class="k-text k2"><b>来源</b></span>
                    </div>
                    <div class="list-content">
                        <div class="pd-item">
                            <input type="text" name="row[rsku][]" value="">
                            <input type="text" name="row[name][]" value="">
                            <select class="form-control" name="row[itemsource][]">
                                <option value="Aliexpress">Aliexpress</option>
                                <option value="Amazon,">Amazon</option>
                                <option value="Ebay">Ebay</option>
                                <option value="Wish">Wish</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        {else /}
            <div class="in-content">
                <div class="products-list">
                    <div class="head-box">
                        <span class="k-text k2"><b>SKU</b></span>
                        <span class="k-text k2"><b>商品名</b></span>
                        <span class="k-text k3"><b>来源</b></span></div>
                    {foreach $skus as $key=>$item}
                        <div class="list-content">
                            <div class="pd-item">
                                <input type="text" name="row[rsku][]" value="{$item.sku}">
                                <input type="text" name="row[name][]" value="{$item.name}">
                                <select class="form-control" name="row[itemsource][]">
                                    <option value="Aliexpress" {if condition="$item.itemsource == 'Aliexpress' "}selected='selected'{/if} >Aliexpress</option>
                                    <option value="Amazon" {if condition="$item.itemsource == 'Amazon' "}selected='selected'{/if}>Amazon</option>
                                    <option value="Ebay" {if condition="$item.itemsource == 'Ebay' "}selected='selected'{/if}>Ebay</option>
                                    <option value="Wish" {if condition="$item.itemsource == 'Wish' "}selected='selected'{/if}>Wish</option>
                                </select>
                                <a href="javascript:;" class="btn btn-x btn-danger remove-item">解除关联</a>
                            </div>
                       </div>
                    {/foreach}
                </div>
            </div>
        {/empty}

    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
